import { http } from "../utils/http";
import { ReturnDTO } from "./type";

// 获取验证码
export const getVerify = (): Promise<ReturnDTO> => {
  return http.request<ReturnDTO>("get", "/user/staff/captcha");
};

// 登录
export const getLogin = (data: object): Promise<ReturnDTO> => {
  return http.request<ReturnDTO>("post", "/user/staff/login", data);
};

// 注册
export const getRegist = (data: object): Promise<ReturnDTO> => {
  return http.request<ReturnDTO>("post", "/register", data);
};
